1. Field of the Invention
The present invention relates to a data transmission apparatus capable of making wireless communication, a method for controlling the data transmission apparatus, and a storage medium.
2. Description of the Related Art
In recent years, many devices with a wireless local area network (LAN) conforming to the IEEE802.11 standard have been produced. As a technique for reducing power consumption of a wireless communication unit for making wireless communication, there is known a power saving mode of a wireless LAN discussed in Japanese Patent Application Laid-Open No. 2002-300175. The power saving mode will be described with reference to FIGS. 1, 2, and 3.
FIG. 1 illustrates processing performed when the power saving mode is disabled. FIG. 1 illustrates a printing apparatus as an example of a device with a wireless LAN. When the power saving mode is disabled in the printing apparatus, a wireless communication unit of the printing apparatus is always in an Awake state, or in a power-supplied state. When the wireless communication unit is in the Awake state, the printing apparatus can transmit data to an external device or receive data transmitted from an external device by use of wireless communication.
When an access point receives data addressed to the printing apparatus from an information processing apparatus such as a personal computer (PC) (101), the access point transmits the data to the printing apparatus (102). The access point transmits a signal called beacon at constant intervals to a peripheral device, and the data transmission illustrated at 102 of FIG. 1 is performed irrespective of the beacon intervals.
Processing performed when the power saving mode is enabled will be described below with reference to FIG. 2. When the power saving mode is enabled, the wireless communication unit repeats a transition between the Awake state and a Doze state. The Doze state is a state in which power supplying to the wireless communication unit is blocked or reduced, and when the wireless communication unit is in the Doze state, the printing apparatus cannot transmit data to an external device or receive data transmitted from an external device by use of wireless communication.
When the power saving mode is enabled, the wireless communication unit intermittently transitions from the Doze state to the Awake state in synchronization with the beacon intervals of the access point (201 to 203). The access point which receives data (data addressed to the printing apparatus) transmitted from the information processing apparatus uses information such as Traffic Indication Message (TIM) or Delivery Traffic Indication Message (DTIM) to notify, to the printing apparatus, that the data addressed to the printing apparatus is present (204, 205). TIM is directed for notifying, to the printing apparatus, that data addressed to the printing apparatus is present. DTIM is a type of TIM, and indicates that data to be transmitted is for multicast or broadcast.
The printing apparatus which transitions to the Awake state at timing 206 in FIG. 2 receives TIM notified at timing 205. The printing apparatus requests the access point to transmit the data (207). The access point which receives the request at timing 207 transmits data 1 to the printing apparatus (208).
When the power saving mode is enabled, the wireless communication unit transitions from the Awake state to the Doze state under a condition that data is not transmitted nor received between the printing apparatus and the access point in the Awake state for a predetermined time (half the beacon interval, for example). In FIG. 2, when a predetermined time 209 elapses after the printing apparatus receives the data 1, the wireless communication unit transitions from the Awake state to the Doze state (210). After transitioning to the Doze sate, the wireless communication unit intermittently transitions from the Doze state to the Awake state in synchronization with the beacon intervals of the access point similarly as at 201 to 203. The condition that the wireless communication unit transitions from the Awake state to the Doze state is not limited to an elapse of the predetermined time 209. The wireless communication unit may transition from the Awake state to the Doze state under a condition that no accumulation of data addressed to the printing apparatus is confirmed by the beacon.
The power saving mode of the wireless LAN is enabled thereby to reduce power consumption of the wireless communication unit. However, when the power saving mode of the wireless LAN is enabled, a communication delay easily occurs when the printing apparatus receives data (such as print job) transmitted from the access point. The reason why a delay easily occurs will be described with reference to FIG. 3.
When the information processing apparatus transmits a large amount of data (large-size data) to the printing apparatus via the access point, the large amount of data is divided to be transmitted. FIG. 3 illustrates an example in which a large amount of data is divided into data 1, data 2, and data 3 to be transmitted. The access point receives the data 1 transmitted from the information processing apparatus at 301. When the power saving mode is disabled, the access point can immediately start to transmit the data 1 to the printing apparatus, but the power saving mode is enabled, and thus the access point waits until a next beacon timing and then transmits the data 1 to the printing apparatus. That is, a communication delay with time 302 occurs unlike when the power saving mode is disabled.
The wireless communication unit of the printing apparatus which has completely received the data 1 transitions from the Awake state to the Doze state at timing 303 if data is not transmitted nor received for a predetermined time. If a timing when the access point receives the data 2 from the information processing apparatus is later than 303 as illustrated in FIG. 3, the access point waits until a next beacon timing and then transmits the data 2 to the printing apparatus. That is, a communication delay with time 304 occurs also when the access point transmits the data 2 to the printing apparatus. A communication delay with time 305 similarly occurs also when the access point transmits the data 3 to the printing apparatus.
FIG. 3 illustrates the example in which a large amount of data is divided into three items of data, but the number of items of divided data to be actually transmitted is enormous, and thus a communication delay is more conspicuous. As a technique for solving the issue, Japanese Patent Application Laid-Open No. 2009-071385 discusses therein a communication terminal device for disabling a power saving mode of a wireless LAN on receiving streaming data such as moving images or sounds. The communication terminal device discussed in Japanese Patent Application Laid-Open No. 2009-071385 disables the power saving mode of the wireless LAN on receiving streaming data such as moving images or sounds, thereby preventing a communication delay with 304 or 305 of FIG. 3 from occurring.
The communication terminal device discussed in Japanese Patent Application Laid-Open No. 2009-071385 can prevent a communication delay from occurring on receiving streaming data such as moving images or sounds in the power saving mode of the wireless LAN. However, the communication terminal device discussed in Japanese Patent Application Laid-Open No. 2009-071385 needs to be provided with a special structure of determining whether received data is streaming data, and if the data is streaming data, disabling the power saving mode. The communication terminal device discussed in Japanese Patent Application Laid-Open No. 2009-071385 cannot disable the power saving mode if the received data is not streaming data such as moving images or sounds, even if a communication delay easily occurs in the received data.